package com.woniuxy01;

import java.util.Scanner;

public class Test07 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("输入班级人数");
        int num = sc.nextInt();
        int[] scores = new int[num];
        int total = 0,avg= 0;
        for (int i = 0; i < num; i++) {
            System.out.println("输入第"+(i+1)+"个人的成绩");
            scores[i] = sc.nextInt();
            total += scores[i];
        }
        avg = total / num;
        System.out.println("成绩列表");
        for (int i = 0; i < num; i++) {
            System.out.println(scores[i]);
        }
        System.out.println("总分："+total);
        System.out.println("平均分："+avg);
    }
}
